package com.ruoyi.domain.inventory;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 库存记录对象 mes_inventory_record
 * 
 * @author ruoyi
 */
@Data
public class MesInventoryRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 记录ID */
    private Long recordId;

    /** 记录编号 */
    @Excel(name = "记录编号")
    private String recordCode;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    private Long warehouseId;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String warehouseName;

    /** 物料ID */
    @Excel(name = "物料ID")
    private Long materialId;

    /** 物料编码 */
    @Excel(name = "物料编码")
    private String materialCode;

    /** 物料名称 */
    @Excel(name = "物料名称")
    private String materialName;

    /** 批次号 */
    @Excel(name = "批次号")
    private String batchCode;

    /** 操作类型（入库/出库/调拨） */
    @Excel(name = "操作类型", readConverterExp = "入库/出库/调拨")
    private String operationType;

    /** 操作数量 */
    @Excel(name = "操作数量")
    private BigDecimal quantity;

    /** 操作日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date operationDate;

    /** 单位 */
    @Excel(name = "单位")
    private String unit;

    /** 操作人员ID */
    @Excel(name = "操作人员ID")
    private Long operatorId;

    /** 操作人员姓名 */
    @Excel(name = "操作人员姓名")
    private String operatorName;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operationTime;

    /** 关联订单ID */
    @Excel(name = "关联订单ID")
    private Long relatedOrderId;

    /** 关联订单编号 */
    @Excel(name = "关联订单编号")
    private String relatedOrderCode;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 操作人员 */
    @Excel(name = "操作人员")
    private String operator;

    /** 关联单号（工单号/采购单号等） */
    @Excel(name = "关联单号", readConverterExp = "工单号/采购单号等")
    private String relatedCode;

    /** 记录类型（入库/出库/调拨/盘点） */
    @Excel(name = "记录类型", readConverterExp = "入库/出库/调拨/盘点")
    private String recordType;
}